package com.ktjy;

import entity.pet;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.PetService;

public class Main {
    @Test
    public void test1() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        pet pet=(entity.pet) context.getBean("pet");
        PetService petService = (PetService) context.getBean("PetServiceImpl");
        petService.save(pet);
    }
}
